$(document).ready(function() {
	$('i18n').each(function(i, obj) {
		var msg = $(this).text();
		$(this).text(browser.i18n.getMessage(msg));
	});
	
	var languages = ['de', 'en']; // languages supported at this time
	var helplink = $('.help-link').attr('href');
	var privacylink = $('.privacy-link').attr('href');

	if(languages.includes(browser.i18n.getUILanguage())){ // if the user's preferred language is supported by Cloud Firewall all href links will get the respective language code in front of the filetype
	  helplink = 'help.' + browser.i18n.getUILanguage() + '.html';
	  privacylink = 'privacy.' + browser.i18n.getUILanguage() + '.html';
	} else {
	  helplink = 'help.en.html';
	  privacylink = 'privacy.en.html';
	}
});